package com.tuanbiao.ui.auth.adapter;

import androidx.annotation.NonNull;

import com.abiao.lib_utils.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.tuanbiao.R;

import java.io.File;

/**
 * @author abiao
 * @since 2022/4/24 11:08
 */
public class AuthLocalTxtAdapter extends BaseQuickAdapter<File, BaseViewHolder> {
    public AuthLocalTxtAdapter() {
        super(R.layout.item_auth_local_txt);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, File file) {
        holder.setText(R.id.tv_serial_number, String.valueOf(holder.getLayoutPosition() + 1))
                .setText(R.id.tv_name, file.getName())
                .setText(R.id.tv_last_modify,TimeUtils.millis2String(file.lastModified()));
    }
}
